﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharpSphinx.Linguist.Acoustic.TiedState
{
    public class Pool<T>
    {

        /// <summary>
        /// NEED EnumMap 
        /// </summary>

        public enum Feature{
          NUM_SENONES,
          NUM_GAUSSIAN_PER_STATE,
          NUM_STREAMS
         };

        private String name;
        private List<T> Pool;
        private Dictionary<Feature, int> features = new Dictionary<Feature, int>(sizeof(Feature));

        public Pool(String name)
        {
            this.name = name;
            Pool = new List<T>();
        }



        public String Name
        {
            get
            {
                return name;
            }
        }

        public T Get(int id)
        {
            return Pool.ElementAt(id);
        }

        public int IndexOf(T Object)
        {
            return Pool.IndexOf(Object); 
        }

        public void Add(int id, T o)
        {
            if (id == Pool.Count)
            {
                Pool.Add(o);

            }
            else
            {
             // Pool.
            }

        }


        public int Size
        {
            get
            {
                return Pool.Count;
            }
        }

        public void setFeature(Feature feature, int value)
        {
            features.Add(feature, value);
        }

        public int getFeature(Feature feature,int DefaultValue)
        {
          // int val = features.




        }
    }
}
